package ooday03;

import java.util.Scanner;

public class RefArrayDemo {
    public static void main(String[] args) {
        Scanner scan  = new Scanner(System.in);
        Dog[] dogs = new Dog[3];

        for (int i = 0;i<dogs.length;i++){
            System.out.println("名字");
            String name  = scan.next();
            System.out.println("年龄");
            int age  = scan.nextInt();
            System.out.println("颜色");
            String color  = scan.next();
            dogs[i] = new Dog(name,age,color);
        }

        for (int i= 0;i< dogs.length;i++){
            System.out.println( dogs[i].name +  dogs[i].age +  dogs[i].color);
        }











        /*-

        Dog[] dogs = new Dog[3];
    Chick[] chicks = new Chick[3];
    Fish[] fish = new Fish[2];
*/


    }
}
